import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    userInfo: {
      name: '张三',
    },
  },
  mutations: {
    // 修改用户姓名
    changeUserInfo(state, data) {
      state.userInfo.name = data
    },
  },
  actions: {},
  modules: {},
})
